<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%verify}}".
 *
 * @property string $id 编号，自增，主键
 * @property string $target 发送目标
 * @property string $verify_code 验证码
 * @property int $send_time 最后发送时间
 * @property int $send_status 发送状态：1,发送成功；2，发送失败
 * @property int $create_at 产生时间
 * @property int $targetType 目标类型（1：手机，2：邮箱）
 */
class Verify extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%verify}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['verify_code'], 'string'],
            [['send_time', 'send_status', 'create_at', 'targetType'], 'integer'],
            [['target'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'target' => Yii::t('app', 'Target'),
            'verify_code' => Yii::t('app', 'Verify Code'),
            'send_time' => Yii::t('app', 'Send Time'),
            'send_status' => Yii::t('app', 'Send Status'),
            'create_at' => Yii::t('app', 'Create At'),
            'targetType' => Yii::t('app', 'Target Type'),
        ];
    }
}
